package com.itheima.nest;

import java.util.*;
import java.util.function.Consumer;

public class Test07 {
    public static void main(String[] args) {
        //创建Map集合，Key值表示班级，Value值表示学生对象
        Map<String,List<Student>> map = new TreeMap<>();

        //创建List集合，存储学生信息
        List<Student> calls1 = new ArrayList<>();
        calls1.add(new Student("01","张三",96.5));
        calls1.add(new Student("02","李四",99.5));
        calls1.add(new Student("03","王五",95));
        map.put("一班",calls1);

        List<Student> calls2 = new ArrayList<>();
        calls2.add(new Student("04","赵六",96.5));
        calls2.add(new Student("05","陈七",99.5));
        calls2.add(new Student("06","张三",95));
        map.put("二班",calls2);

        map.forEach((k,v)-> System.out.println(k+"："+v));



    }
}
